home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 09 - 1993 / 09.06 Jun 93 / TReportPrinter / Demo.r < prev    next >
Encoding:
Text File  |  1992-11-01  |  4.4 KB  |  200 lines  |  [TEXT/MPS ]

  1. //----------------------------------------------------------------------------------------
  2. // Demo.r 
  3. // Copyright © 1992 by William L. Colsher  All rights reserved.
  4. //----------------------------------------------------------------------------------------
  5.  
  6.  
  7. // Standard Includes 
  8.  
  9. #ifndef __TYPES.R__
  10. #include "Types.r"
  11. #endif
  12.  
  13. #ifndef __SYSTYPES.R__
  14. #include "SysTypes.r"
  15. #endif
  16.  
  17. #ifndef __BalloonTypes__
  18. #include "BalloonTypes.r"
  19. #endif
  20.  
  21. #ifndef __MacAppTypes__
  22. #include "MacAppTypes.r"
  23. #endif
  24.  
  25. #ifndef __ViewTypes__
  26. #include "ViewTypes.r"
  27. #endif
  28.  
  29. #if qDebug
  30. include "Debug.rsrc" not 'ckid';
  31. #endif
  32.  
  33. include "MacApp.rsrc" not 'ckid';
  34.  
  35. // Includes for Building Blocks
  36.  
  37. include "Dialog.rsrc" not 'ckid';
  38.  
  39. // Include Code Resources
  40.  
  41. include $$Shell("ObjApp")$$Shell("XAppName") 'CODE';
  42.  
  43. //--------------------------------------------------------------------------------------------------
  44. // CONSTANTS 
  45. //--------------------------------------------------------------------------------------------------
  46.  
  47. // Finder Information
  48. // ------------------
  49.  
  50. #define kApplicationName    $$Shell("XAppName")
  51. #define kSignature            'DEMO'            // Application signature 
  52. #define kFileType            'PROJ'            // Data file type 
  53.  
  54.  
  55. // Bundle Constants
  56. // ------------------
  57.  
  58. #define kBundleID                        128
  59. #define kApplicationID                    128
  60. #define kDocumentID                        129
  61.  
  62.  
  63. // Text styles
  64. // --------------
  65.  
  66. #define kSystemTextStyle                1000
  67.  
  68. // 'View' resources
  69. // --------------
  70.  
  71. include "DemoViews.rsrc" not 'ckid';
  72.  
  73. // Memory Management Resources
  74. // ---------------------------
  75.  
  76. #define kDemoSeg    1000
  77. #define kDemoMem    1000
  78. #define kDemoRes    1000
  79.  
  80. //--------------------------------------------------------------------------------------------------
  81. // RESOURCES FOR MENUS 
  82. //--------------------------------------------------------------------------------------------------
  83.  
  84. include "Defaults.rsrc" 'CMNU' (mApple);    // Grab the default Apple menus
  85. include "Defaults.rsrc" 'CMNU' (mFile);
  86. include "Defaults.rsrc" 'CMNU' (mEdit);
  87.  
  88.  
  89. //--------------------------------------------------------------------------------------------------
  90. // Menu Bars 
  91. //--------------------------------------------------------------------------------------------------
  92.  
  93. resource 'MBAR' (kMBarDisplayed,
  94. #if qNames
  95. kApplicationName,
  96. #endif
  97.     purgeable) {
  98.     { mApple; mFile; mEdit; }
  99. };
  100.  
  101.  
  102. //--------------------------------------------------------------------------------------------------
  103. // About Box
  104. //--------------------------------------------------------------------------------------------------
  105.  
  106. resource 'DITL' (phAboutApp,
  107. #if qNames
  108. "phAboutApp",
  109. #endif
  110.     purgeable) {
  111.      {    /* array DITLarray: 3 elements */
  112.         /* [1] */
  113.         {160, 182, 180, 262},
  114.         Button {
  115.             enabled,
  116.             "OK"
  117.         };
  118.         /* [2] */
  119.         {10, 75, 150, 316},
  120.         StaticText {
  121.             disabled,
  122.             "TReportPrinter Demo Application."
  123.             "\n\nThis program was written "
  124.             "with MacApp® © 1985-1991 Apple Computer, Inc."
  125.         };
  126.         /* [3] */
  127.         {10, 20, 42, 52},
  128.         Icon {
  129.             disabled,
  130.             1
  131.         }
  132.     }
  133. };
  134.  
  135. include "Defaults.rsrc"  'ALRT' (phAboutApp);    // Grab the default about box
  136.  
  137. //--------------------------------------------------------------------------------------------------
  138. // MultiFinder™ information
  139. //--------------------------------------------------------------------------------------------------
  140.  
  141. resource 'SIZE' (-1) {
  142.     saveScreen,
  143.     acceptSuspendResumeEvents,
  144.     enableOptionSwitch,
  145.     canBackground,
  146.     doesActivateOnFGSwitch,
  147.     backgroundAndForeground,
  148.     dontGetFrontClicks,
  149.     ignoreAppDiedEvents,
  150.     is32BitCompatible,
  151.     isHighLevelEventAware,
  152.     localAndRemoteHLEvents,
  153.     notStationeryAware,                
  154.     reserved,
  155.     reserved,
  156.     reserved,
  157.     reserved,
  158. #if qModelFarCode
  159.     575 * 1024,
  160.     550 * 1024,
  161. #elif qDebug
  162.     500 * 1024,
  163.     475 * 1024
  164. #else
  165.     350 * 1024,
  166.     325 * 1024
  167. #endif
  168. };
  169.  
  170. //--------------------------------------------------------------------------------------------------
  171. //  Version resources
  172. //--------------------------------------------------------------------------------------------------
  173.  
  174. // The revision of this particular file
  175.  
  176. RESOURCE 'vers' (1,
  177. #if qNames
  178. "File Version",
  179. #endif
  180.     purgeable) {
  181.     0x01,
  182.     0x00,
  183.     beta,
  184.     0x0A,
  185.     verUs,
  186.     "1.0",
  187.     "TReportPrinter Demo Application, ©William L. Colsher 1992"
  188. };
  189. include "Defaults.rsrc"  'vers' (2);        // Overall package
  190.  
  191. resource 'mem!' (kDemoMem,
  192. #if qNames
  193.     "Additional Memory Requirements",
  194. #endif
  195.     purgeable) {
  196.     16 * 1024,                // Add to temporary reserve
  197.     32 * 1024,                // Add to permanent reserve
  198.     0                        // Add to stack space
  199. };
  200.